


<!DOCTYPE html>
<html id="htmlId">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  <title>Coverage Report > CartMapper</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">com.ie.mapper.before</a>
</div>

<h1>Coverage Summary for Class: CartMapper (com.ie.mapper.before)</h1>

<table class="coverageStats">
<tr>
  <th class="name">Class</th>
</tr>
<tr>
  <td class="name">CartMapper</td>
</tr>

</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package com.ie.mapper.before;
&nbsp;
&nbsp;import com.baomidou.mybatisplus.core.mapper.BaseMapper;
&nbsp;import com.ie.entity.admin.CartEntity;
&nbsp;import io.lettuce.core.dynamic.annotation.Param;
&nbsp;import org.apache.ibatis.annotations.Delete;
&nbsp;import org.apache.ibatis.annotations.Select;
&nbsp;import org.springframework.stereotype.Repository;
&nbsp;
&nbsp;import java.util.List;
&nbsp;
&nbsp;@Repository
&nbsp;public interface CartMapper extends BaseMapper&lt;CartEntity&gt; {
&nbsp;    List&lt;CartEntity&gt; selectByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;
&nbsp;    // 根据用户ID和商品ID查询购物车项
&nbsp;    CartEntity selectByUserIdAndGoodsId(
&nbsp;            @Param(&quot;userId&quot;) Integer userId,
&nbsp;            @Param(&quot;goodsId&quot;) Integer goodsId
&nbsp;    );
&nbsp;
&nbsp;    // 根据用户ID删除购物车
&nbsp;    int deleteByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;
&nbsp;    // 获取用户购物车商品数量
&nbsp;    int selectCountByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;    List&lt;CartEntity&gt; selectByBusertableId(@Param(&quot;busertableId&quot;) Integer busertableId);
&nbsp;}
&nbsp;
&nbsp;
&nbsp;//// 修正参数类型为 Integer，并添加 @Select 注解
&nbsp;//@Select(&quot;SELECT * FROM carttable WHERE busertable_id = #{userId}&quot;)
&nbsp;//List&lt;CartEntity&gt; selectByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;//
&nbsp;//// 根据用户ID和商品ID查询购物车项
&nbsp;//@Select(&quot;SELECT * FROM carttable WHERE busertable_id = #{userId} AND goodstable_id = #{goodsId}&quot;)
&nbsp;//CartEntity selectByUserIdAndGoodsId(
&nbsp;//        @Param(&quot;userId&quot;) Integer userId,
&nbsp;//        @Param(&quot;goodsId&quot;) Integer goodsId
&nbsp;//);
&nbsp;//
&nbsp;//// 根据用户ID删除购物车
&nbsp;//@Delete(&quot;DELETE FROM carttable WHERE busertable_id = #{userId}&quot;)
&nbsp;//int deleteByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;//
&nbsp;//// 获取用户购物车商品数量
&nbsp;//@Select(&quot;SELECT COUNT(*) FROM carttable WHERE busertable_id = #{userId}&quot;)
&nbsp;//int selectCountByUserId(@Param(&quot;userId&quot;) Integer userId);
&nbsp;//
&nbsp;//// 修正参数类型为 Integer，并添加 @Select 注解
&nbsp;//@Select(&quot;SELECT * FROM carttable WHERE busertable_id = #{busertableId}&quot;)
&nbsp;//List&lt;CartEntity&gt; selectByBusertableId(@Param(&quot;busertableId&quot;) Integer busertableId);
&nbsp;//}
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2025-06-15 18:23</div>
</div>
</body>
</html>
